<?php
$tdatappsubcategory=array();
	$tdatappsubcategory[".ShortName"]="ppsubcategory";
	$tdatappsubcategory[".OwnerID"]="";
	$tdatappsubcategory[".OriginalTable"]="ppsubcategory";


	
//	field labels
$fieldLabelsppsubcategory = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsppsubcategory["English"]=array();
	$fieldToolTipsppsubcategory["English"]=array();
	$fieldLabelsppsubcategory["English"]["SubcategoryID"] = "SubcategoryID";
	$fieldToolTipsppsubcategory["English"]["SubcategoryID"] = "";
	$fieldLabelsppsubcategory["English"]["SubcategoryName"] = "SubcategoryName";
	$fieldToolTipsppsubcategory["English"]["SubcategoryName"] = "";
	$fieldLabelsppsubcategory["English"]["Category"] = "Category";
	$fieldToolTipsppsubcategory["English"]["Category"] = "";
	if (count($fieldToolTipsppsubcategory["English"])){
		$tdatappsubcategory[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsppsubcategory["Spanish"]=array();
	$fieldToolTipsppsubcategory["Spanish"]=array();
	$fieldLabelsppsubcategory["Spanish"]["SubcategoryID"] = "SubcategoryID";
	$fieldToolTipsppsubcategory["Spanish"]["SubcategoryID"] = "";
	$fieldLabelsppsubcategory["Spanish"]["SubcategoryName"] = "SubcategoryName";
	$fieldToolTipsppsubcategory["Spanish"]["SubcategoryName"] = "";
	$fieldLabelsppsubcategory["Spanish"]["Category"] = "Category";
	$fieldToolTipsppsubcategory["Spanish"]["Category"] = "";
	if (count($fieldToolTipsppsubcategory["Spanish"])){
		$tdatappsubcategory[".isUseToolTips"]=true;
	}
}


	

	

$tdatappsubcategory[".shortTableName"] = "ppsubcategory";
$tdatappsubcategory[".nSecOptions"] = 0;
$tdatappsubcategory[".recsPerRowList"] = 1;	
$tdatappsubcategory[".tableGroupBy"] = "0";
$tdatappsubcategory[".mainTableOwnerID"] = "";
$tdatappsubcategory[".moveNext"] = 1;




$tdatappsubcategory[".showAddInPopup"] = false;

$tdatappsubcategory[".showEditInPopup"] = false;

$tdatappsubcategory[".showViewInPopup"] = false;


$tdatappsubcategory[".fieldsForRegister"] = array();

$tdatappsubcategory[".listAjax"] = false;

	$tdatappsubcategory[".audit"] = true;

	$tdatappsubcategory[".locking"] = false;
	
$tdatappsubcategory[".edit"] = true;
$tdatappsubcategory[".inlineEdit"] = true;
$tdatappsubcategory[".view"] = true;

$tdatappsubcategory[".exportTo"] = true;

$tdatappsubcategory[".printFriendly"] = true;

$tdatappsubcategory[".delete"] = true;

$tdatappsubcategory[".showSimpleSearchOptions"] = false;

$tdatappsubcategory[".showSearchPanel"] = true;


$tdatappsubcategory[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdatappsubcategory[".addPageEvents"] = false;

$tdatappsubcategory[".arrKeyFields"][] = "SubcategoryID";

// use datepicker for search panel
$tdatappsubcategory[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatappsubcategory[".isUseTimeForSearch"] = false;

$tdatappsubcategory[".isUseiBox"] = false;


	

	


$tdatappsubcategory[".isUseInlineAdd"] = true;

$tdatappsubcategory[".isUseInlineEdit"] = true;
$tdatappsubcategory[".isUseInlineJs"] = $tdatappsubcategory[".isUseInlineAdd"] || $tdatappsubcategory[".isUseInlineEdit"];

$tdatappsubcategory[".allSearchFields"] = array();

$tdatappsubcategory[".globSearchFields"][] = "SubcategoryName";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("SubcategoryName", $tdatappsubcategory[".allSearchFields"]))
{
	$tdatappsubcategory[".allSearchFields"][] = "SubcategoryName";	
}
$tdatappsubcategory[".globSearchFields"][] = "Category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Category", $tdatappsubcategory[".allSearchFields"]))
{
	$tdatappsubcategory[".allSearchFields"][] = "Category";	
}


$tdatappsubcategory[".googleLikeFields"][] = "SubcategoryID";
$tdatappsubcategory[".googleLikeFields"][] = "SubcategoryName";
$tdatappsubcategory[".googleLikeFields"][] = "Category";



$tdatappsubcategory[".advSearchFields"][] = "SubcategoryID";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("SubcategoryID", $tdatappsubcategory[".allSearchFields"])) 
{
	$tdatappsubcategory[".allSearchFields"][] = "SubcategoryID";	
}
$tdatappsubcategory[".advSearchFields"][] = "SubcategoryName";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("SubcategoryName", $tdatappsubcategory[".allSearchFields"])) 
{
	$tdatappsubcategory[".allSearchFields"][] = "SubcategoryName";	
}
$tdatappsubcategory[".advSearchFields"][] = "Category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Category", $tdatappsubcategory[".allSearchFields"])) 
{
	$tdatappsubcategory[".allSearchFields"][] = "Category";	
}

$tdatappsubcategory[".isTableType"] = "list";


	



// Access doesn't support subqueries from the same table as main
$tdatappsubcategory[".subQueriesSupAccess"] = true;





$tdatappsubcategory[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatappsubcategory[".strOrderBy"] = $gstrOrderBy;
	
$tdatappsubcategory[".orderindexes"] = array();

$tdatappsubcategory[".sqlHead"] = "select SubcategoryID,  SubcategoryName,  Category";
$tdatappsubcategory[".sqlFrom"] = "FROM ppsubcategory";
$tdatappsubcategory[".sqlWhereExpr"] = "";
$tdatappsubcategory[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatappsubcategory[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatappsubcategory[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "SubcategoryID";
	$tdatappsubcategory[".Keys"] = $tableKeys;

//	SubcategoryID
	$fdata = array();
	$fdata["strName"] = "SubcategoryID";
	$fdata["ownerTable"] = "ppsubcategory";
	$fdata["Label"]=GetFieldLabel("ppsubcategory","SubcategoryID"); 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SubcategoryID";
	
		$fdata["FullName"]= "SubcategoryID";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdatappsubcategory["SubcategoryID"]=$fdata;
//	SubcategoryName
	$fdata = array();
	$fdata["strName"] = "SubcategoryName";
	$fdata["ownerTable"] = "ppsubcategory";
	$fdata["Label"]=GetFieldLabel("ppsubcategory","SubcategoryName"); 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SubcategoryName";
	
		$fdata["FullName"]= "SubcategoryName";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=30";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatappsubcategory["SubcategoryName"]=$fdata;
//	Category
	$fdata = array();
	$fdata["strName"] = "Category";
	$fdata["ownerTable"] = "ppsubcategory";
	$fdata["Label"]=GetFieldLabel("ppsubcategory","Category"); 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="CategoryName";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="CategoryName";
				$fdata["LookupTable"]="ppcategory";
	$fdata["LookupOrderBy"]="CategoryName";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Category";
	
		$fdata["FullName"]= "Category";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatappsubcategory["Category"]=$fdata;


	
$tables_data["ppsubcategory"]=&$tdatappsubcategory;
$field_labels["ppsubcategory"] = &$fieldLabelsppsubcategory;
$fieldToolTips["ppsubcategory"] = &$fieldToolTipsppsubcategory;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["ppsubcategory"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["ppsubcategory"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










function createSqlQuery_ppsubcategory()
{
$proto0=array();
$proto0["m_strHead"] = "select";
$proto0["m_strFieldList"] = "SubcategoryID,  SubcategoryName,  Category";
$proto0["m_strFrom"] = "FROM ppsubcategory";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "SubcategoryID",
	"m_strTable" => "ppsubcategory"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "SubcategoryName",
	"m_strTable" => "ppsubcategory"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "Category",
	"m_strTable" => "ppsubcategory"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto11=array();
$proto11["m_link"] = "SQLL_MAIN";
			$proto12=array();
$proto12["m_strName"] = "ppsubcategory";
$proto12["m_columns"] = array();
$proto12["m_columns"][] = "Category";
$proto12["m_columns"][] = "SubcategoryID";
$proto12["m_columns"][] = "SubcategoryName";
$obj = new SQLTable($proto12);

$proto11["m_table"] = $obj;
$proto11["m_alias"] = "";
$proto13=array();
$proto13["m_sql"] = "";
$proto13["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto13["m_column"]=$obj;
$proto13["m_contained"] = array();
$proto13["m_strCase"] = "";
$proto13["m_havingmode"] = "0";
$proto13["m_inBrackets"] = "0";
$proto13["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto13);

$proto11["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto11);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

return $obj;
}
$queryData_ppsubcategory = createSqlQuery_ppsubcategory();
$tdatappsubcategory[".sqlquery"] = $queryData_ppsubcategory;



$tableEvents["ppsubcategory"] = new eventsBase;
$tdatappsubcategory[".hasEvents"] = false;

?>
